perm filename RNOTES[LSP,JRA]20 blob sn#230404 filedate 1976-08-10 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	compare lisp car, cdr cons to ent suc, pred
C00010 00003	
C00029 ENDMK
C⊗;
compare lisp car, cdr cons to ent suc, pred

note on global variables: scheme of substituting values for
vars wont work. to wit "y←y+1"

DO TWO STACKS: CS, VS

dont forget morris's characterization of d.s. ...use in
section on lists-sexprs;  perhaps also fwh

make is_false as compared to  nill[x] for pred. vs. seq

make examples use initials mjc dba...

		*"theory in programming languages, should be used lke garlic in cooking"

HOW TO HANDLE MACHINE: In machine section DEFINE the  top level
and use throughout; eg, something like DE DF DM. and point to
appendix for functions which convert brand X into  super lisp.

good quote for last chapter regarding the relevance of lisp
" those who don't learn from past mistakes, are bound to repeat them"
thus even though lisp is ancient, its lessons STILL have not been learned
and before looking for another windmill, we'd better take stock.

thought on protection: cf go to with while; while uses go to, but in
 a way which disallows wild transfers into other code.
 indeed, with procs we diminish even more. It would appear then than
 most of way is left is  bad calling sequences, and strong typing 
  will hack that.

		**DO BETTER JOB ON local,global,free. 
see morris on protection.

re ds in s-lisp: add protection and prvacy
in conjunction with above add access and privacy to procedures? => actors

reviewers ≡ unindited co conspiratiors

		**find king kong pic

compare denot(not(x))=x and not(denot(x))~x to retracts and tgm's

primacy of graph of functon...finding closed for sol comes
later(if at all by process of discovery)

ADD λ(X) X(X)(λX X(X))

clancy: add details of  gc,storage, impl for other machines...

how much in sotr and eff in stacks, queues, threading...etc?
probably as much as in 123a

HOW DO YOU KNOW IF A DOMAIN EQUATION HAS A SOLUTION?:TARSKI'S THM;
OPERATOR  T IS MONOTONE IN A COMPLETE LATTICE, OR CONTINOUS IN A
PARTIAL ORDER THEN X=T(X) HAS FIX POINT, IN PARTICUALR A MINIMAL ONE.

add problem on succes and pred for lisp wrt. number theory

don't forget mg's suggestion on  motivating Y see *.msg[p,jra]
...fact prob is appliation of Y combinator(λf.((λx.f(xx))(λx.f(xx))))


put in domains for atoms, sezprs, etc..then when discussing
self refential functions note similarity to self referential domains.

add function values discussion to  shallow binding discussion

must add E discussion to one-pas assemblers.

		**go through and replace car, cdr by first and rest whenever we are working on lists.

		**in regard to above...should do same for cons in context of adding new element to front.
		** name it conc.

		**good lisp never uses car and cdr

put short history of LISP in intro

go through lect notes from ucsc for ideas

go through pll.pro for ideas

ADD RET. FUNCTIONS AS VALUE 
SHOW HOW TO USE FUN VAL VARS AS CONTROL REGIMES

	**compare the superficiality of math sem sect with writing axioms vs.
	**showing consistency completeness.

give better def of macro PLUS using expand...

what about adding more on gc, stacks, ques, threading, double linking...etc to
storae and efficency.

should say more about relation between ds.def a la list and diagram on
rep of problem in LISP as underlying rep

with above note that sexpr rep is underlying rep

→→→→→→→→→→→think about subset of lisp st. gc not needed question.

	**add "rest" as another seq. selector

reformat definitions to line up → under each other

	**note car[cons[e1,e2]] not identical to e1 since e2 may fuck up.

	**NO -- m.gordon: can the trivial probelms!!!?

more on begugging and editing lisp.. tracing, breaking, structure editing
	**add bad jokes aboout sharp sticks

think about compiler traversing program as turning static inpput 
into prog to be executed; as it traverses, leaving recursive calls to be
completed, until it reaches  terminals.

	**for chriss sakes make abstract compiler!!!!!!!!


	**CHAPTER TITLES?? IMPL, COMPL => STATIC DYNMIC

	**reorganization?? remove most of explicit  AMBIT..only intuitive
	**ambit crappies should go into storaage and efficiency

	**note that abstract defintion: ismumble1,ismumble 2...tends to flush order
	**dependent of cond since only one branch will be true and all others false

	**add strachey's comment about use vs. understanding

	**add const, sel, and pred motivation on lists= sequences

	**thought  on den vs. oper: most programmers note that it is always easier
	**to write you own than to modify soemone else's.

IF A FORM BINDS ALL VARIABLES, THE A FUNCTION SHOULD BIND ALL FREE.
AND THUS NEED ANOTHER NOTATION FOR FUNCTIONS A LA LISP.
NO!!!,THAT IS NOT WHAT HAPPENS TO FORMS. VALUE{X+Y for X=2} IS 2+Y.
PERHAPS BIND THOSE WITH VALUES, LEAVE FREE THOSE, W.O. IN FUNCTION DEF.




	**NOTE THAT SYNTAX ALLOWS SEXPRES IN PiPLACES IN COND.

desparately need appenidces with 1) syntax for lisp;2) eval.

SUDDEN THOUGHT* WHILE WRITING SOGM; THE SET OF PREDICATES CONST AND SELECTORS
SHOULD BE ORGANIZED SUCH THAT A CHANGE OF REP AUTOMATICALLY(!!!) CHANGES P,C, AND S.

what is lisp eval: its program working on abstract syntax descrption of lisp.
ie CS[AS]→AS=>CS. ALMOST!!!! really CS[AS]→CS'
   WHERE CS' value of d.s. manipulation is in CS;
             value of prog manipulation is in AS;

previous remark related to lack of form-valued variables in LISP; are they useful??

	**stress difference between function as mapping a la church and set of ordered pairs

	**in section which talks abput self-application  show that unrestricted self application
	**leads to trouble. eg in reynolds notes i think. drop hint about continuity
	**as subset for which self application is o.k.

YES!! (perhaps) use meta variables

CF. λ-CALCULUS AND SELF APPLICATION WITH LISP AND SELF ANALYSIS

LOOK AT GRZGOROCK FOR MOTIVATION TO SCOTT AND APPROX

ADD MUCH MORE ON λ-CALC 
  EXERCISES ON NORMAL FORM AND REDUCTION  
  AND ON NO NORMAL FORM

ABSTCT SYNTAX SEE C.W.49-50

!!!how to make biblio. make PUB macro to build page refs in biblio telling
where ref is used. give synopsis of contents of eaach reference.

COMPARISON  LISP- λ-CALS λX2 IS 2 IN λ-CALC

GIVE INTUITION OF Y AS COMBINATOR

DEVELOP REDUCTION RULES A'LA λ-CALC; MOTIVATE FROM SECTION ON λ-CAL
BY SHOWING PROGMATICS OF λ-RED.

add equality and defined predicates, perhaps as problems.MAL p34.

add MAL's comment on evcon e.g. eval on
(COND((QUOTE X)(QUOTE X))((QUOTE T)(QUOTE T))
yeilds T ather than undefined.  probably add as problem
compare definition on lisp 1.5 man v.s. necessity of composition

add relationship between notation-denotation and concrete-abstract
den(not(x)≡x  car(cons(x,y))≡ x   cf MAL p46.

add intuitive continuous, monotonic 
		*and strict

ADD FIXPOINTING ON DATA TYPES; E.G. SEXPR = ATOM ∪ SEXPR

		**NOTE: MATHEMATICAL MEANING IS MORE BASIC THAN MANIPULATIVE MENAING; 
OP VS. DEN CF TRUTH VS. PROVABILITY D.SCOTT )
		*LISP EAN PL EXPRESSIONS HAAVE MENAING INDEPENDENT OF RULES OF CALC.

COMPARE D.PARK SHOW Y=Y' VIA SCOTT THOUGH NOT SAME NORMAL FORM

		**ADD BS IN INTRO ABOUT SCOTT

		*GOOD EXAMPLE OF DENOT VS. OP
		*F = λ(N)(N=0 → 0, F(N-1) + 2N -1
		*OPERATION OF EVLAUATION FOR SAMPLE ARGS F(0), F(1),...IS REALLY  HUNTING FOR LIMIT
		*OF SEQUENCE OF FUNCTIONS FIST TOTALLY UNK THE ON2 VAL, THE 2,...
		*PROCESS USUALLY STOPS WHEN WE SUDDNENLY RELIZE THE DENOTATION IS N↑2.

Must add mathematics of λ-notation in early section and relate to LISP; then
refere to this in Scott section
re above: λ's and machine i.e. copy rule NO order of eval etc( probably wegner and
church)

		**MUST add better description of global or fluid variable prior to Scott section!!

add graph of function

		*DO INTUITIVE SCOTT ON GM SUBSETS

remark: notice that "real" eval does more than c-b-v in that it looks at the
type of the "function" before evaluating args--fexpr v.s. expr. True
c-b-v  doesn't look at funct. until after  args are evaled.

faces of recursion as described by hewitt and [?]; trying to separate
may help motivate continuatiions.

		*evalquote[fn;args] = f[arg1, ...argn] relates denotational with opereational

		*question for reader:  is λ[x]2 same as λ[]2?

is "value" vs. "meaning" a distinction worth making..probably; see
tennet phd II-22.

		*wadsworth: operational requires specifying too much p.4. cf lisp call by value
		  *and l-r evaluation of args.

		*more on undefined and scott's logic

ADD CONTINUATIONS..

TRY FOR || BETWEEN OLD EVAL, NEW EVAL GENERIC AND ACTORS

	*in section of λ-notation:  note that <= is NOT assignment
	*for  fact <= λ[[x][ ... T→*[x,fact[x-1]]] would say use fact on RHS
	*in assigning  to LHS, and THAT IS WRONG! <= is fixed po	int.
	*c.f.  x ← -(2x+1)/x and x = -(2x+1)/x. first has value dependent on current value
	of x. second has SOLUTION of x=1. so to with fact above; it has solu*tion, but
	*here solution is a function rather than a simpl	e value.
	*introduce through example:
	g←λy.y+1
	f←λx.g[x]
	whats f[2]
	g←λy.y-1
	what's f[2]
	*1. if doesn't change, then try fact.lose.
	*2. if does change lose closures.

Quam's suggestions:
1. re tracing and debugging: hack similar ro value cells where sube/fsubr link is
immovable and we pushj through it.

2. more hhs on bignums

		**what the fuck does abstract data structure mean.
		**perhaps consider following: definition of lists in LISP wrt to
		**UR of dp's. input: recog (a b); output: how to print; reognizer: islist;
		**how to generate; how to select: n(th); 1-4 via SDIO; 1-2 external; 3-5 internal.


look at old 7090 lisp compr


		*note in sdio and in debugging sdio's importance for debugging
		*you can read it!!

		*another reason for removing go to and label. when writing a smart compiler
		*much can be saved by remembering what is where(in which ac's] note
		*how much of lisp complier is getting registers set up.
		*code at label can be approached from any go to. so we must try
		*to remember whether every approach has same setting of reg; only then can we
		*optimize; give example; remove go to and label and problem goes away.


DEEP BINDING COMPILER !!!!! AND PROOF A'LA LONDON
    NOTE THAT DEEP BIN COMP HAS NAMES ON STACK SHALL DOESN'T..BUT CAN BE FIXED
    GOOD FOR DEBUGGING

NOTE FUNCTION WILL COMPILE CODE USUSALLY WHEREAS QUOTE WON'T.

		*ABSTRACT EVAL AND CO  SHOWING FUNARG AS PER WEIZENBAUM

		**arg about deep binding and searching stack: loop is expensive ; 
		**therefore another reason to keep iteration in language and away from programmer
		**(i.e. no go to's) since then  can be "smart" about access....should be
		**able to do something about  "fast memory" in such case

arg two: bobrow's claim that functon names are global; if i reassign defintion
for function, say "car" it is local in strongest sense rather than global.

add syntax of progs

		*somewhere...we shall be interested in ideas not coding tricks

section on types of binding perhaps: value, ref, uneval , name, ...AND BINDING
  BY PATTERN: PDI

bruce's comments
		*1. say what "undefined" means in implementation
		*    should ref implementation when undefined is first mentioned, but put later
		**2. separation of rep from algorithm
3. doesn't like special forms.. justify
4. more examples of func. args.  show lossage on closure.
		*5. doesn't like shallow binding and func. args.
6. circularity and d.scott
		*7. handling of calling w.o. ac's i.e. 1.5 imp
8. non-trivial for g.c. to search bps....true
9. wants hacks in bbn lisp exposed
10. suggest some kind of indirection for callin function args..prob poor
11. doesn't believe bit map necessary for more complex data structure marking.
12. moron dope vector

		*check basel on free vars in procedure assignments

		*check if we have noted that outlawing globals woulf f.u. function names
		*(which ARE  globals)

		*add  handling of funargs with shallow binder in binding revisited.

		*add selectq as a prob compare to case statement

		* on function v.s. form cf. λ[]x+y  vs x+y
		*ON CLOSED VS OPEN

		*ALTERNATIVE CALLING IN STACK RATHER THAN AC'S

		**note on SM-eval: if car of form is not atomic then it is assumed to be
		**reducible to a function (NOT fexpr) i.e. it evals arg. tsk,tsk.
		**related problem: can eval and co. be changed to not be so precipitous about
		**evaluating args.
		**then there's the nlambda horse shit....

		*hlisp eval with types

		**but in explicit discussion of functions: fixed # of args in definition and call
		**in fact  in section showing equal[A;A] or what ever

		**probelm:  predecessor 

		**explicit thaat f[a1; ...an] is apply[F a1' ....an'; st of a	ll called non prim funcst]

should show explicitly stack picture of returns on stack
do in parallel with coutour...i.e. in columns

		*(LAMBDA(LAMBDA) ...) AFTER NEW SYM TAB 
		*OR  prog[x;y]    ......x← y;    x:      ....go [x]
		*either of above for multiplcity of props.

NEED SECTION ON READ HACKERY...INTERN READLIST  EXPLODE

		*EXTENSIVE SECTIONS ON BINDING SHALLOW DEEP HACKERY

EXTENSIONS OF LISP A LA PLANNER DATA BASES PATT MATCH..
PATTERN DIRECTED INNVOC

		*WEIZENBAUM ON CONTROL BOBROW-WEG


MACHINES 

		*QUAMS SDIO MLISP2  H.S.


how about multiple values reutrnrd s.t. function with mult args can get

shoW eval doesn't have to search oblist to find atom..done by read

		**MOVE FEXPR-MACRO SECTION TO AREA OF SM-EVAL

		**PROBLEM OF DIRECT REVERS W.O. APPEND

		add function-form distinction in λ-expr section
		
		put cross ref to form where bnf is described  for form

		COMMENT: ADD BOYER-MOORE TO PROOF SECTION, AND BIBLIO

PROBLEM IN 3.9 VALUE IN SYMTAB

		IN MACRO: WHY BETTER THAN SUBR...MORE EFFICIENT OPEN CODED BUT CAN
		BE INTUITIVE NOTATION...CF POLY EXAMPLE

		**PROBLEM IN DIFF SECTION : EXTEND TO N-ARY OPS

COMMENT: SAY "IF ARGS ARE ATOMIC..." WE REALLY MEAN "IF VALUE OF ARGS IS ATOMIC...."

		**COMMENT CAR CDR ARE SELECTORS; CONS IS CONSTRUCTOR

PROBLEM: GIVE CAR-CDR TO FIND ATOM IN..


		IN INT NOTES IN 4 SECTIONS: LANG,EVAL,IMP,COMP

ADD FANCY DIFFERENTIATION AFTTER FUN ARGS

		**ADD J. MORRIS EXAMPLE IN PROBLEMS CONCERNING COND AND ORDER
		OF EVAL

		**in list section: cons[x list] (x,    )

		add bumpfh about relative spped and space of compilation .: why not
		compile.. debugging editing...etc.

add problems on efficient compilation,using open car and cdr

		**get going on bibliography

		**ADD PROB OF EVAL FOR CALL BY NAME

IMPLICATIONS OF LISP TO OTHER LANGUAGES  COMPILING BETTER SINCE
MUCH KNOWN AT COMPILE TIME ETC. PARISNG  ETC

		**bootstrapping for chrissakes!!!!!

		**add problem in applic. of rpacac  for ratom

		**reference counters

		**crap on committee effect

notes on c e quote from test

		**define FEXPR, SUBR, EXPR FSUBR 

		*PICTURES .STRUCTURE OF FACT
		*	OBLIST
		*	NIL
		*	BIN AND UNBIND
		*	AMBIT GC
		* 	AMBIT PRIMITIVES

		**tiltle super lisp to be published by mung,manure and sun, the organic pub  co.

		**explain NIl vs evwrything else in cestrin on implemenasion--where eq x;x is given

		** problem for rplacd: rplacd x;cdr x is?

		**PROB INPROGS: EXTEND EVAL TO PROG

		**prob in progs extensions a la muddle conniver
		initialization of aux; optional, tuple eval unevaled args
		check if micro-plnr allows initialized aux.

		**much more on lambdda and internal lambdas and uses.

		**add arrays

fart with funarg and functional args: weizenbaum
INCLUDE MULTIPLE OBLISTS HERE ON S.T. DISCUSSION
note collision problem of say compiler loacals with user thus muli sym.

		**add BNF for functions near front

		**add fexpr-fsubr discussion in new eval and into discussion of how to compile

		**MORE ON NUMBERS IN FIRST SECTION

		**ADD VALUE CELL DEPRESSION, PNAME TOO

		*add LISP version of gc a la exam to secion on AMBIT

		**add calling conventions to simple pdp-10 section 6.12

more examples on machine

		**equivalence of length reverse append

		**need to add full assembler somewhere

		**add problem of Jorge: function bringing back dotted pair of
		**info found in arbit. tree.

		**hs. on semantics added to front of  compilation hs.

		**table driven scanner and parser **table driven in progs


		**and and or into compiler?

		**add E to description of assemble

		**add C as well

		**ADD SKETCH OF COMPILATION OF F = J G(X)H(Y) 

		**multiple car-cdrs and lists 1st.2nd etc

		**hash consing

errset, catch and throw

multiple oblists

		**read muddle manual again

readlist intern

i/o channels

bbn lisp editor and debugger